---
title: Share Button
description: A share button component with animated icons.
author:
  name: ChenHaoJie9527
  url: https://github.com/ChenHaoJie9527
---

<ComponentPreview name="demo-components-community-share-button" />

## Installation

<ComponentInstallation name="components-community-share-button" />

## Usage

```tsx
<ShareButton />
```

## API Reference

### ShareButton

<TypeTable
  type={{
    children: {
      description: 'The content of the button.',
      type: 'React.ReactNode',
      required: true,
    },
    className: {
      description: 'Class name for the outermost container.',
      type: 'string',
      required: false,
    },
    size: {
      description: 'The size of the button.',
      type: '"default" | "sm" | "lg"',
      required: false,
    },
    icon: {
      description: 'The icon of the button.',
      type: '"suffix" | "prefix"',
      required: false,
    },
    onIconClick: {
      description: 'The callback function when the icon is clicked.',
      type: '(platform: "github" | "x" | "facebook") => void',
      required: false,
      default: 'undefined',
    },
    '...props': {
      description: 'The rest of the props for the button.',
      type: 'HTMLMotionProps<"button">',
      required: false,
    },

}}
/>

## Credits

- Credits to [SharpTH](https://uiverse.io/SharpTH/swift-bullfrog-75) for the inspiration
